The present invention relates to the display of a waveform image of an electrical signal, and more particularly to a realtime (R/T) display compression algorithm and circuit for preserving intensity information when the waveform image is down-scaled to fill a variable display area.
It is desirable to present a waveform image on an oscilloscope display in a pleasing manner for a viewer. With the current large liquid crystal display (LCD) panels having a pixel size of 1024×768 (horizontal×vertical), for example, it is important to effectively use the space available. Currently the waveform image is created and stored at a fixed size, such as in a 500×400 raster memory, and then is compressed or expanded (scaled) to support different user interface menu sizes and features. The compression/expansion process occurs as a post-rasterizing step, i.e., after the sampled electrical signal data has been processed to produce the waveform image in the raster memory. Since the electrical signal is being acquired generally on a continuous basis, i.e., for each enabled trigger signal a data record is acquired in the form of a specified number of samples of the electrical signal and stored temporarily until rasterized into the raster memory, the raw data samples are not available for the compression/expansion process.
The raster memory size of 500×400 is reasonable for an LCD display that is 640×480. It allows room above and below the waveform display area on an oscilloscope display for a user interface (UI), and prior UI implementations were simple, not requiring the flexibility that more recent post processing applications, measurements and analysis software packages demand on the display space. As the applications and measurements packages become more prevalent, and trigger capability is expanded, a larger oscilloscope display is useful. To use a larger oscilloscope display, scaling features of off-the-shelf graphics chips are used to scale the 500×400 waveform image to 1000×600. This introduces scaling factors of 1.5× vertically and 2× horizontally. These scaling factors produce very little artifacts, and only up-scaling is used.
In performance oscilloscopes the emerging display architecture is optimized to draw a 1000×500 waveform image, i.e., a larger raster memory is used. This fits readily in an XGA LCD display that is 1024×768. If the waveform image is fixed at this size, the display area that is covered by applications and measurements packages when turned on is wasted when the applications and measurements packages are turned off. The current commercially available graphics chips being used in performance oscilloscopes receive the waveform image at a “zoom video port.” This digital video port or bus is generally 16-bits wide and can transfer around 60 frames or images per second, i.e., these graphics chips use a dedicated video port architecture. These graphics chips do an acceptable job of up-scaling the waveform image for “full screen mode”, but do not do a good job of down-scaling the waveform image to make room for applications and measurements packages on the display area. These graphics chips work in the red, green, blue (RGB) color space, i.e., the pixel information has red, green and blue content. This color information for each pixel is stored as 16-bit data in the RGB565 format—bits 0-4 represent blue content, bits 5-10 represent green content and bits 11-15 represent red content. When up-scaling is used, a smaller waveform image is expanded into a larger finite space. No information is lost. If nice numbers are used (1.5×, 2.0×, etc.), the result is always uniform and acceptable. Scaling in the RGB color space has the affect of “averaging” the color together since there is no priority—black averaged with white produces grey.
Down-scaling is another story. The graphics chips are optimized for video applications where there are very few sharp images and the viewer's eye does not detect the imperfections. These graphics chips are not optimized for graphics applications with sharp images and fine details against a black background, as is prevalent in oscilloscope waveform image displays. The simplest form of down-scaling is decimation. Pixels are discarded so the waveform image fits physically in less space. A better form of down-scaling is averaging in the RGB color space. A pixel or group of pixels are averaged with a neighboring pixel to produce a result that is the combination of the two. Finite impulse response (FIR) filtering or conventional arithmetic methods implement some form of averaging. However a bright input pixel that has black pixels on either side of it results in a single dim pixel in the down-scaled output result. If this bright pixel makes up the top line of a square wave image display on an oscilloscope, this dimming effect clearly is not a desirable effect when the rest of the square wave image is at full brightness. Therefore using commercial graphics chips optimized for color video results in distorted oscilloscope waveform images that are dimmed in places. For example, a 1000×500 waveform image that is scaled to 1000×210 (2.38× vertical down-scaling) results in a displayed waveform image that has dimmed sections as well as sections that disappear, as shown in FIG. 1. This is because the graphics chips only average over two pixels at this resolution. For down-scaling factors greater than 2× the graphics chips use both decimation and averaging to produce the result which is unacceptable to the viewer and a poor representation of the vertically compressed waveform image.
What is desired is an algorithm and circuit that is capable of compressing a waveform image in a way that does not present spurious information on an oscilloscope display to a viewer.